package pers.ree.demo.lambda;

import org.junit.Test;

public class LambdaDemo {

    @Test
    public void testMathOperation() {
        MathOperation addition = (int a, int b) -> a + b;

        System.out.println(addition.operation(1, 2));

        StringPrint stringPrint = (String s)-> System.out.print(s);
        stringPrint.print("sss");
    }

    interface MathOperation {
        int operation(int a, int b);
    }

    interface StringPrint {
        void print(String s);
    }
}
